Link creation, target module permission issue?

Hello All,

 

There is an issue currently I am facing with link creation, my requirement is to create a module with objects with links to multiple modules, All these modules may not have write privileges, is there anyway I can create links to these modules? Other question is how can I create links to a target module without intrupting it, since I noticed it is getting closed when I run my program, I dont want it will effect the other users work while creating links.

Any ideas please, I appeciate your suggetions.

thanks,


RvSaladi - Thu Oct 16 11:16:02 EDT 2014

Re: Link creation, target module permission issue?
Chris Annal - Thu Oct 16 13:08:06 EDT 2014

Unless for some reason your access to the target module is "None", you shouldn't have any problems linking to it. You only need Write access in the Source module where you are creating the links. You only need Read access to the Target module in order to link to an object in it.

I'm not sure why a module would "close" when you run your program. It may be helpful to look at the actual script you are referring to. This is how an example link is created using DXL, per the DOORS DXL Help files...This example creates a link from the current object of the current module to the first object of module target via the link module tested by.

(current Object) -> "tested by" -> (first read "target")
 

Notice how "read" is used to open the Target module in Read mode, since Edit mode isn't necessary to create the link from the current Object in the Source module to the first Object in the Target module (named "target").

Re: Link creation, target module permission issue?
RvSaladi - Thu Oct 16 13:56:32 EDT 2014

Chris Annal - Thu Oct 16 13:08:06 EDT 2014

Unless for some reason your access to the target module is "None", you shouldn't have any problems linking to it. You only need Write access in the Source module where you are creating the links. You only need Read access to the Target module in order to link to an object in it.

I'm not sure why a module would "close" when you run your program. It may be helpful to look at the actual script you are referring to. This is how an example link is created using DXL, per the DOORS DXL Help files...This example creates a link from the current object of the current module to the first object of module target via the link module tested by.

(current Object) -> "tested by" -> (first read "target")
 

Notice how "read" is used to open the Target module in Read mode, since Edit mode isn't necessary to create the link from the current Object in the Source module to the first Object in the Target module (named "target").

Hello Chris, thank you for the response,

Yes it is closing the target module, i have tested, I have also tested a module from different project where I (user) do not have the access, the link creation failed. Here is the code what I am using

{code}

target_Module_For_Linking = read(lTargetModuleName, false, false)
if(target_Module_For_Linking == null) {
    return "Error in opening target Module"
}

targetObj = object(intOf(objId), target_Module_For_Linking)
if(targetObj ==  null) {
    return "Not able to locate the target object"
}
tObj -> linkModuleName -> targetObj
close(target_Module_For_Linking)

{code}

Re: Link creation, target module permission issue?
RvSaladi - Thu Oct 16 13:59:24 EDT 2014

RvSaladi - Thu Oct 16 13:56:32 EDT 2014

Hello Chris, thank you for the response,

Yes it is closing the target module, i have tested, I have also tested a module from different project where I (user) do not have the access, the link creation failed. Here is the code what I am using

{code}

target_Module_For_Linking = read(lTargetModuleName, false, false)
if(target_Module_For_Linking == null) {
    return "Error in opening target Module"
}

targetObj = object(intOf(objId), target_Module_For_Linking)
if(targetObj ==  null) {
    return "Not able to locate the target object"
}
tObj -> linkModuleName -> targetObj
close(target_Module_For_Linking)

{code}

Also please note that, I need to link to a object in that target module, thatsWhy i am usign in belo line in above code

targetObj = object(intOf(objId), target_Module_For_Linking)
 

to use while linking, if there any other way where I can crate link to the required object without calling the above line, it should be great

Thank you,

 

Re: Link creation, target module permission issue?
RvSaladi - Thu Oct 16 14:17:41 EDT 2014

Anybody has any idea how to create the links to a particular object in the target module rather than "first" or "last" as mentioned below

(current Object) -> "tested by" -> (first read "target")

(current Object) -> "tested by" -> (last read "target")

but like

(current Object) -> "tested by" -> (<at object 123> read "target") ??

I appreciate your help.

thanks,

Ravi

 

 

 

Re: Link creation, target module permission issue?
RvSaladi - Thu Oct 16 14:47:21 EDT 2014

Found the solution like below, for your use

tObj -> linkModuleName -> (gotoObject(intOf(objId), read(lTargetModuleName,false)))

 

This neither close the existing open module(target) nor discard the unsaved changes,,

 

-Ravi.

Re: Link creation, target module permission issue?
GregM_dxler - Mon Oct 20 09:48:51 EDT 2014

RvSaladi - Thu Oct 16 13:56:32 EDT 2014

Hello Chris, thank you for the response,

Yes it is closing the target module, i have tested, I have also tested a module from different project where I (user) do not have the access, the link creation failed. Here is the code what I am using

{code}

target_Module_For_Linking = read(lTargetModuleName, false, false)
if(target_Module_For_Linking == null) {
    return "Error in opening target Module"
}

targetObj = object(intOf(objId), target_Module_For_Linking)
if(targetObj ==  null) {
    return "Not able to locate the target object"
}
tObj -> linkModuleName -> targetObj
close(target_Module_For_Linking)

{code}

I think in a round about way and with coding luck you might have resolved your issues.

The line close(target_Module_For_Linking) is what is closing the target module.  Remove that line and then the module will not close.

You may want to consider saving the source module for the links.

If you do not have read access to the target module, you will get an error when trying to make a link.

Hope this helps,

Greg